package com.utilities;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

public class ResponseUtil {
       public static void write(HttpServletResponse response,String msg,String url,int sleep){
    	   PrintWriter pWriter = null;
		try {
			pWriter = response.getWriter();
		} catch (IOException e) {
			e.printStackTrace();
		}
	   response.setHeader ("refresh", ""+sleep+";URL="+url+"");
       pWriter.println("<html><head><meta charset=\"utf-8\"/></head><body>"+msg+"</body></html>");
       }
}
